package com.example.common.handle;

import lombok.Data;

/**
 * 自定义异常类
 *
 * @author zhuyonggang
 * @DateTime: 2021/6/24 9:59
 */
@Data
public class BusinessException extends RuntimeException {
    //错误码
    private Integer code;
    //错误信息
    private String message;

    public BusinessException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public BusinessException(String message) {
        this.message = message;
    }
}
